Yacon.container.Field = function(){
	this.fFieldName    = "";
	this.fFieldValue   = "";
	this.parent        = null;
};

Yacon.container.Field.Extend(Object,{
	
	/* 获取字段名 */
	getFieldName :function(){
		return this.fFieldName;
	},
	
	/* 设置字段名 */
	setFieldName:function(fieldName){
		if(fieldName)
			this.fFieldName = fieldName;
	},
	
	/* 获取字段值 */
	getFieldValue:function(){
		
		if(Yacon.isString(this.fFieldValue)){
			return this.fFieldValue.decode();
		}
		
		return this.fFieldValue;
	},
	
	/* 设置字段值 */
	setFieldValue:function(fieldValue){
		
		if(Yacon.isString(fieldValue)){
			this.fFieldValue = fieldValue.encode();
		}else{
			this.fFieldValue = fieldValue;
		}	
		
	},
	
	/* 设置父记录 */
	setParent:function(record){
		this.parent = record;
	},
	
	/* 获取父记录 */
	getParent:function(){
		return this.parent;
	}
		
});